home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
database
/
hklib01
/
hklib01.doc
next >
Wrap
Text File
|
1987-05-01
|
9KB
|
322 lines
Howard Kapustein's Library of Clipper functions
Version 0.10 05-01-1987
Copyright (c) Howard Kapustein 1987
I am an overworked college student who took time out from
studying so I could put this all together. If you find this
library to be of use, and would like to see more functions
in the future, a small contribution might inspire me. The
contribution can be any amount you wish. I recommend $5 but
feel free to send whatever you think this library is worth
to you.
Please send all contributions, comments, and/or suggestions to:
Howard Kapustein
1695 Barbara Lane
East Meadow, NY 11554
I can be reached at The BOSS BBS in New Jersey: (201) 568-7293.
If you have any interest in Clipper, I highly recommend The BOSS.
Dirk Lesko runs a Clipper conference where you can talk to many
experts from around country as well as check out the latest
information about Clipper, including bug lists, UDFs, and much more.
The files included with Howard Kapustein's Library Ver. 0.10 are:
hklib01.lib - Howard Kapustein's Library Ver. 0.10
hklib01.doc - documentation for Library Ver. 0.10
hktest01.prg - use this to test library functions
To use any of the functions listed here, just include the function
name in your code and add the library file when linking your program.
For another excellent library of Clipper functions, check out Dirk
Lesko's libraries DL1A and DL1B (for use with Winter'85 and Autumn'86
versions respectively). And don't forget to call The BOSS BBS (201) 568-7293
DISCLAIMER OF WARRANTIES
────────────────────────
Howard Kapustein distributes these functions solely on an
"as is" basis and offers no warranties, period.
Howard Kapustein shall not bear any liability or responsibility
to any user or entity with respect to any liability, loss or
damage caused, or alleged to be caused directly, or indirectly
by the functions contained in this product, including but not
limited to interruption of services, loss of business or
anticipatory profits or consequential damages resulting from
the use or operation of any of the functions contained in this
product.
Howard Kapustein makes no warranties, either expressed or implied
regarding this software product, it's merchantibility and/or
it's fitness for a particular purpose. The user agrees that
Howard Kapustein shall not be held liable for any consequential
damages, even if Howard Kapustein has been advised of the
possibility of such damages.
By using any of the functions contained in this library, you
acknowledge your agreement with all of the above conditions.
LICENSING
─────────
You may incorporate any of the functions into software
applications you develop, and you may distribute copies
of the programs to anyone you wish.
Feel free to make copies of the library, and to pass
them along to other users of Clipper. so as to further
perpetuate the dBASE language, and the Clipper compiler.
No source code is released with this library, and none
is available for release onto the BBS sytems. You may
upload and download copies of Howard Kapustein's Library
onto any bulletin board you like, and you may distribute
copies of Howard Kapustein's Library as long as no fee
is charged, and all Copyright notices are left intact.
Although no source code is released with this library,
if you would like a copy, contact me and I will probably
give it to you. Howard Kapustein reserves the right not to
release the source code at any time, as well as the right
to ask for payment in exchange for the source code.
TRADEMARK NOTICE
────────────────
Clipper is a trademark of Nantucket Corporation
dBASE is a trademark Ashton-Tate
OK, enough with the legal mumbo-jumbo. Here are the functions:
════════════════════════════════════════════════════════════════
Clipper 1 CENTER() FUNCTION
________________________________________________________________
SYNTAX: @ 3,CENTER(mem_var) SAY mem_var
PARAMETERS: <expC> character string
RETURNS: <expN> integer
PURPOSE: to find the column to print at so <mem_var> will
be at the centered
NOTES: returns INT((80-LEN(mem_var))/2)
EXAMPLE: message = "Press any key to continue"
@ 3,CENTER(message) SAY message
════════════════════════════════════════════════════════════════
Clipper 1 DOL_STR() FUNCTION
________________________________________________________________
SYNTAX: mem_var = DOL_STR(<expN>)
PARAMETERS: <expN> numeric value to convert
RETURNS: character string in the form $99,999.99
PURPOSE: To convert a number to a dollar string format
NOTES: if a negative number is converted, it will be in
the form $-99,999.99
only the first 2 decimal places are converted
EXAMPLE: m_dol = DOL_STR(62378.93)
?m_dol
** returns "$62,378.93"
m_dol = DOL_STR(-1274.88)
?m_dol
** returns "$-1,274.88"
m_dol = DOL_STR(7422.6321)
?m_dol
** returns "$7,422.63"
════════════════════════════════════════════════════════════════
Clipper 1 MOD() FUNCTION
________________________________________________________________
SYNTAX: mem_var = MOD(<expN>,<expN>)
PARAMETERS: <expN> dividend
<expN> divisor
RETURNS: <expN> remainder of <expN>/<expN>
PURPOSE: to find the remainder of a division
NOTES: the parameters passed to MOD() must be numeric
EXAMPLE: m_var = MOD(5,3)
?m_var
** returns 2
m_var = MOD(4.5,2)
?m_var
** returns .5
════════════════════════════════════════════════════════════════
Clipper 1 ISSTATE() FUNCTION
________________________________________________________________
SYNTAX: mem_var = ISSTATE(<expC>)
PARAMETERS: <expC> is a 2-letter state abbreviation
RETURNS: .T. if <expC> is a valid 2-letter state abbreviation
.F. otherwise
PURPOSE: to test if an entry is a valid state abbreviation
NOTES: ISSTATE() checks if the parameter passed to it is <expC>
<expC> must be all upper-case
EXAMPLE: ?ISSTATE("NY")
** returns .T.
?ISSTATE("NEW YORK")
** returns .F.
SEE ALSO: STABBR(), STFULL()
════════════════════════════════════════════════════════════════
Clipper 1 MOD() FUNCTION
________________________________________________________________
SYNTAX: mem_var = MOD(<expN>,<expN>)
PARAMETERS: <expN> dividend
<expN> divisor
RETURNS: <expN> remainder of <expN>/<expN>
PURPOSE: to find the remainder of a division
NOTES: parameters passed to MOD() must be numeric
EXAMPLE: m_var = MOD(5,3)
?m_var
** returns 2
m_var = MOD(4.5,2)
?m_var
** returns .5
════════════════════════════════════════════════════════════════
Clipper 1 STABBR() FUNCTION
________________________________________________________________
SYNTAX: mem_var = STABBR(<expC>,<expL>)
PARAMETERS: <expC> is a state name
<expL> is whether STABBR should be case sensitive
RETURNS: the 2-letter abbreviation of <expC>
PURPOSE: to convert a state name to its abbreviation
NOTES: if <expC> is not a state name, "**" is returned
EXAMPLE: ?STABBR("NEW YORK",.F.)
** returns "NY"
?STABBR("NEW",.F.)
** returns "**"
?STABBR("New York",.T.)
** returns "NY"
?STABBR("New",.T.)
** returns "**"
════════════════════════════════════════════════════════════════
Clipper 1 STFULL() FUNCTION
________________________________________________________________
SYNTAX: mem_var = STFULL(<expC>)
PARAMETERS: <expC> is a state abbreviation
RETURNS: the state name for the abbreviation <expC>
PURPOSE: to convert a state abbreviation to its name
NOTES: if <expC> is not a state abbreviation, "*" is returned
<expC> must be all upper-case
EXAMPLE: ?STFULL("NY")
** returns "New York"
?STFULL("NEW YORK")
** returns "*"